package com.yt.controller;

import com.yt.entity.User;
import com.yt.service.GetInfoFeign;
import com.yt.util.CommonResult;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Classname OrderController
 * @Description
 * @Date 2021/10/20 19:42
 * @Create by 杨涛
 */
@RestController
public class OrderController {
    @Resource
    GetInfoFeign getInfoFeign;

    @RequestMapping("/getinfo")
    public String getinfo() {
        return getInfoFeign.getinfo();
    }

    @RequestMapping("/getjsonusers")
    public CommonResult<List<User>> getJsonUsers() {
        return getInfoFeign.getJsonUsers();
    }

    @RequestMapping("/timeout")
    public String feigntimeout(){
        return getInfoFeign.feigntimeout();
    }
}
